{include file=$header_start}
{strip}
<link rel="stylesheet" type="text/css" href="{$siteroot}/templates/default/style/dashboard.css">
<script src="{$siteroot}/includes/js/myaccount.js" type="text/javascript"></script>
{/strip}
{literal}
<script type="text/javascript">

	function allowCharAndNumbersOnly(e)                                               //Allows only characters to be entered    
	{
		if(navigator.appName=="Microsoft Internet Explorer")
		{
			if((e.keyCode >64 && e.keyCode < 91)||(e.keyCode >47 && e.keyCode < 58) || (e.keyCode >96 && e.keyCode<123) || e.keyCode==32 || e.keyCode==8 || e.keyCode==0)
			{}
			else
			{
				e.keyCode=" ";
				return false;
			}
		}
		else if(navigator.appName=="Netscape")
		{
			if((e.which >64 && e.which < 91) || (e.which >47 && e.which < 58)|| (e.which >96 && e.which<123) || e.which==0 || e.which==8 || e.which==32)
			{}
			else
				return false;
		}
		return true;
	}
	
	
</script>
{/literal}
{include file=$header_end}
   <!-- MIDDLE CONTAIN GOES HERE -->
<section class="middle_portion">
	<section class="inner_head">Dashboard</section>
    <section class="inner_containstart">
    	<!-- dashboard Left Content Start -->
        	{include file=$cms_left_content}
        <!-- dashboard Left Content End -->
        <!-- dashboard Right Content Start -->
        	<section class="dash_right">            	                
            {if $msg}{$msg}{/if}
            	<section class="title_box">
                    <h4>Edit Profile</h4>
                    <section class="clear"></section>
                </section>
                <form method="post" action="" name="frmMngProfile" id="frmMngProfile" enctype="multipart/form-data">
                 <input type="hidden" name="hidden_userid" id="hidden_userid" value="{$userDetArray.id}" />
                 

                <section class="profile_wrapp">
                    <dl>
                        <dt><label>First Name :  </label></dt>
                        <dd><input type="text" class="input" name="fname" id="fname" value="{$userDetArray.first_name|ucfirst}" /></dd>
                        <section class="clear"></section>
                    </dl>
                    <dl>
                        <dt><label>Last Name : </label></dt>
                        <dd><input type="text" class="input" name="lname" id="lname" value="{$userDetArray.last_name|ucfirst}" /></dd>
                        <section class="clear"></section>
                    </dl>
                    <section class="clear"></section>
                    <dl>
                        <dt><label>Email : </label></dt>
                        <dd><input type="text" class="input" name="email" id="email" value="{$userDetArray.email}" /></dd>
                        <section class="clear"></section>
                    </dl>
                    <dl>
                        <dt><label>Phone : </label></dt>
                        <dd><input type="text" class="input" name="mobno" id="mobno" value="{$userDetArray.phone_number}" /></dd>
                        <section class="clear"></section>
                    </dl>
                    <section class="clear"></section>
                     <dl>
                        <dt><label>Postcode : </label></dt>
                        <dd><input type="text" class="input" name="postcode" id="postcode" value="{$userDetArray.postalcode}" /></dd>
                        <section class="clear"></section>
                    </dl>
                    {if $smarty.session.user_type neq '4'}
                    <section class="clear"></section>
                    <dl>
                        <dt><label>Business name : </label></dt>
                        <dd><input type="text" class="input" name="business_name" id="business_name" value="{$userDetArray.business_name}" /> </dd>
                        <section class="clear"></section>
                    </dl>
                    <dl>
                        <dt><label>Industry : </label></dt>
                        <dd><input type="text" class="input" name="industry" id="industry" value="{$userDetArray.industry}" /></dd>
                        <section class="clear"></section>
                    </dl>
                    <section class="clear"></section>
                    <dl>
                        <dt><label>ABN : </label></dt>
                        <dd><input type="text" class="input" name="abn" id="abn" value="{$userDetArray.abn}" /> </dd>
                        <section class="clear"></section>
                    </dl>
                    <dl>
                        <dt><label>ACN : </label></dt>
                        <dd><input type="text" class="input" name="acn" id="acn" value="{$userDetArray.acn}" /></dd>
                        <section class="clear"></section>
                    </dl>
                    {/if}
                    {if $smarty.session.user_type eq '4'}
                    <dl>
                        <dt><label>State : </label></dt>
                        <dd>						
						<select class="select" name="state_id" id="state_id" >
						<option value="" >Select State</option>
						{section name=i loop=$stateArray}
						<option value="{$stateArray[i].state_id}" {if $userDetArray.state_id eq $stateArray[i].state_id} selected="selected"  {/if}>{$stateArray[i].state_name}</option>
						{/section}
						</select>
						</dd>
                        <section class="clear"></section>
                    </dl>
                    <!--   <section class="clear"></section>
                  <dl>
                        <dt><label>Radius : </label></dt>
                        <dd><input type="text" class="input" name="radius" id="radius" value="{$userDetArray.radius} Kilometres" readonly="readonly"/> </dd>
                        <section class="clear"></section>
                    </dl>-->
                    <dl>
                        <dt><label>Company Name : </label></dt>
                        <dd><input type="text" class="input" name="companyname" id="companyname" value="{$userDetArray.companyname}"  onkeypress="return allowCharAndNumbersOnly(event);" style="text-transform:lowercase;" /></dd>
                        <section class="clear"></section>
                    </dl>
                   <!-- <section class="clear"></section>-->
                     <dl>
                        <dt><label>ABN : </label></dt>
                        <dd><input type="text" class="input" name="abn" id="abn" value="{$userDetArray.abn}" /> </dd>
                        <section class="clear"></section>
                    </dl>
                    <dl>
                        <dt><label>ACN : </label></dt>
                        <dd><input type="text" class="input" name="acn" id="acn" value="{$userDetArray.acn}" /></dd>
                        <section class="clear"></section>
                    </dl>
                    
                    
                    <dl>
                        <dt><label>Company description : </label></dt>
                        <dd><textarea class="textarea" name="companydescription" id="companydescription">{$userDetArray.companydescription}</textarea></dd>
                        <section class="clear"></section>
                    </dl>
<section class="clear"></section>
                    <dl>
                        <dt><label>Company logo : </label></dt>
                        <dd>{if $userDetArray.companylogo}
                        		<section class="com_logo_img_wrapp">
                                <img src="{$siteroot}/includes/image.php?width=150&amp;height=150&amp;image={$siteroot}/uploads/company/{$userDetArray.companylogo}" title="company logo" alt="company logo"/>
                                </section>
                         	{else}	
                            <section class="com_logo_img_wrapp">
                            	<img src="{$siteroot}/uploads/company/defaultcomopany.jpg" height="150px" width="150px"  />
                                </section>
                            {/if}  
                            <input type="file" id="companylogo" name="companylogo"  />     
                         </dd>
                        <section class="clear"></section>
                    </dl>
                    <section class="clear"></section>
                  <!--  <dl>
                        <dt><label>About Me : </label></dt>
                        <dd><textarea class="textarea" name="about_me" id="about_me">{$userDetArray.about_me}</textarea></dd>
                        <section class="clear"></section>
                    </dl>
                    <dl>
                        <dt><label>Work History : </label></dt>
                        <dd><textarea class="textarea" name="workhistory" id="workhistory">{$userDetArray.workhistory}</textarea></dd>
                        <section class="clear"></section>
                    </dl>
                    <section class="clear"></section>
                    <dl>
                        <dt><label>Qualifications & Accreditations : </label></dt>
                        <dd><textarea class="textarea" name="qual_accred" id="qual_accred">{$userDetArray.qual_accred}</textarea></dd>
                        <section class="clear"></section>
                    </dl>-->
                     <section class="clear"></section>
                    
                    {/if}
                    
                    
                     <section class="clear"></section>
                    <section class="bt_save_wrapp">
                    	<input type="submit" value="Save" name="save_btn" id="save_btn" class="bt_save"/>
                        <input type="button" value="Cancel" name="cancel_btn" id="cancel_btn" class="bt_save" {if $smarty.session.user_type eq '3'} onclick="window.location.href='{$siteroot}/myaccount/'" {else} onclick="window.location.href='{$siteroot}/profile/{$userDetArray.newcomapnyname}'" {/if}/>
                    </section>

                </section>                
                </form>
            </section>
        <!-- dashboard Right Content End -->
        	<section class="clear"></section>
    </section>
</section>
{include file=$footer}
